-- GENERATED SPELL FOR [Vyral the Vile] --


function spell0_15202(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(19816,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15202', 3000, 1)
end

function spell1_15202(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17439,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15202', 564, 1)
end

function Sorts_15202(pUnit, Event)
local choix_sorts_15202 = math.random(0, 1)
if choix_sorts_15202 == 0 then
pUnit:RegisterEvent('spell0_15202', 1, 1)
end
if choix_sorts_15202 == 1 then
pUnit:RegisterEvent('spell1_15202', 1, 1)
end
end

function mob15202_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15202', math.random(1500, 3000), 1)
end

function mob15202_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15202_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15202_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15202, 1, 'mob15202_Action')
RegisterUnitEvent(15202, 2, 'mob15202_Leave')
RegisterUnitEvent(15202, 3, 'mob15202_Kill')
RegisterUnitEvent(15202, 4, 'mob15202_Die')
